$displayrecords = "10"; //   
$excludedforums = "42,15,26,39"; //   ..     
$threadchars = "70"; //    
//    
//  : 
//   
$last_threads = $db->query_read("SELECT thread.threadid, thread.title,thread.open, thread.lastpost, thread.postusername, thread.forumid, thread.replycount, thread.lastposter, thread.dateline, IF(views<=replycount, replycount+1, views) AS views, thread.visible, user.username, user.userid 
$delquery FROM " . TABLE_PREFIX . "thread AS thread LEFT JOIN user ON (user.username = thread.lastposter)
$deljoin WHERE thread.open<>10 and thread.forumid NOT IN ($excludedforums) 
$delthreadlimit 
ORDER BY thread.lastpost DESC LIMIT 0, $displayrecords");

while ($last_thread = $db->fetch_array($last_threads))
{
	$last_thread[title] = unhtmlspecialchars($last_thread[title]);
	if (strlen($last_thread[title]) > $threadchars)
	{		
		$last_thread[titletrimmed] = substr($last_thread[title], 0, strrpos(substr($last_thread[title], 0, $threadchars), ' ')) . '...';
	}
	eval('$last10_threads .= "' . fetch_template('last10_thread') . '";');
}
//    
//  : 
//  : 3.6
// www.alshehi.net